{% load comments %}

<div class="comments_container object">

{% get_comment_count for object as comment_count %}
    <div class="collapse_head ">
        <h3 style="display:inline" >{{comment_count}} comments on "{{object}}" [add yours]</h2>
    </div>
    <div id="{{object.slug}}CommentForm" class="collapse_body comments">
	    {% if user.is_authenticated %} 
		{% get_comment_form for object as form %}  
		<form action="{% comment_form_target %}" method="POST">  
		{{ form.comment }}  
		{{ form.honeypot }}  
		{{ form.content_type }}  
		{{ form.object_pk }}  
		{{ form.timestamp }}  
		{{ form.security_hash }}  
		<input type="hidden" name="next" value="{{object.get_absolute_url}}" /> 
		<input type="submit" value="Add comment" id="id_submit" />  
		</form>  
	    {% else %} 
		<p>Please <a href="{% url socialauth_begin 'facebook' %}">log in</a> to leave a comment.</p> 
	    {% endif %} 
    </div>
    <div>
    {% get_comment_list for object as comment_list %}        
            {% for comment in comment_list %}
                <div  id="{{object.slug}}Comment" class="objectComment">
                    {{comment.comment}}
                
                    <span class="objectCommentDetails">
                        &mdash; {{comment.user_name}}, {{comment.submit_date|date:"D d M Y"}}
                    </span>
                </div>
            {% endfor %}
    </div>


    
</div>
